package GUI;

import java.util.ArrayList;

import javax.swing.JPanel;

import GUI.Panels.GamePanel;
import GameObjects.InstanceObject;

public class GameScreen extends JPanel 
{
	private static final long serialVersionUID = 1L;
	
	public static final int WIDTH = Applet.WIDTH;
	public static final int HEIGHT = Applet.HEIGHT - BottomPanel.HEIGHT;
	
	private final GamePanel gamePanel;
	
	private final BottomPanel bottomPanel;
	
	public GameScreen()
	{
		this.setSize(WIDTH, HEIGHT);
		
		this.gamePanel = new GamePanel();
		add(gamePanel);
		this.bottomPanel = new BottomPanel();
		add(bottomPanel);
	}
	
	public BottomPanel getBottomPanel()
	{
		return this.bottomPanel;
	}
	
	public void removeObjectPanels()
	{
		this.bottomPanel.removePanels();
	}
	
	public void render(ArrayList<InstanceObject> objects)
	{
		gamePanel.render(objects);
		gamePanel.repaint();
	}
}
